import {Body, Controller, Ctx, Get, Post} from "../core/router";
import {Http} from "../core/http";

@Controller('auth')
export default class AuthController {

    @Get('')
    public index(@Ctx() ctx) {
        return ctx.render('auth/index');
    }

    @Post('')
    public postAuth(@Body() body, @Http() http) {
        http.post('/v1/user/login',body).then(result=>{
            console.log(result.data);
        })
    }
}
